package com.chaofan.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class People {
    //如果required为false，则表明可以是null
    @Autowired(required = true)
    @Qualifier("cat2")
    private Cat cat;
    @Autowired
    private Dog dog;
    private String name;

}
